<template>
  <div class="content">
    <p class="title">{{ goods.title }}</p>
    <div class="price">
      <span class="newprice">{{ goods.newPrice }}</span>
      <span class="oldprice">{{ goods.oldPrice }}</span>
      <span class="discount">{{ goods.discount>=10?'促销价':(goods.discount)+'折' }}</span>
      <div class="info-service">
        <span class="info-service-item">{{ goods.columns[0] }}</span>
        <span class="info-service-item">{{ goods.columns[1] }}</span>
        <span class="info-service-item">{{ goods.columns[2] }}</span>
      </div>
      <div class="change">
        <div v-for="(item, index) in goods.services" :key="index">
          <div class="item">
            <img :src="item.icon" alt="" />
            <span class="name">{{ item.name }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "detailprointro",
  props: {
    goods: {
      type: Object,
      default: {},
    },
  },
};
</script>
<style scoped>
.content {
  margin-top: 15px;
  padding: 0 8px;
  border-bottom: 5px solid #f2f5f8;
}
.title {
  font-size: 15px;
  padding: 0px 0 10px 0;
}
.newprice {
  font-size: 24px;
  color: #ff5777;
}
.oldprice {
  font-size: 13px;
  padding-left: 8px;
  text-decoration: line-through;
}
.discount {
  width: 25px;
  padding: 2px 5px;
  border-radius: 8px;
  margin-left: 5px;
  position: relative;
  top: -8px;
  text-align: start;
  background-color: #ff5777;
  color: white;
}
.info-service {
  display: flex;
  text-align: center;
  line-height: 20px;
  justify-content: space-between;
  margin: 15px 0 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(100, 100, 100, 0.3);
  color: #999;
}
.info-service-item {
  flex: 1;
  width: 10px;
}
.change {
    margin: 0 -5px 0 -5px;
    margin-top: 15px;
    line-height: 30px;
    display: -webkit-box;
    display: -ms-flexbox;
    /* display: flex; */
    /* flex-wrap: nowrap; */
    /* flex-direction: row; */
    /* flex-direction: row-reverse; */
    font-size: 13px;
    text-overflow: ellipsis;
    border-bottom: 1px solid rgba(100,100,100,.1);
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}
.change .item {
  flex: 1;
  
}
.change img {
  width: 14px;
}
</style>